package com.qingding.fragment;

import android.support.v4.app.Fragment;

import com.qingding.R;
import com.qingding.fragment.JingXuanFragment;
import com.qingding.fragment.ShuRiFragment;
import com.qingding.fragment.WoDeFragment;

public class FragmentFactory{
        public static Fragment getInstanceByIndex(int index) {
            Fragment fragment = null;
            switch (index) {
                case R.id.jingxuan:
                    fragment = new JingXuanFragment();
                    break;
                case R.id.shuri:
                    fragment = new ShuRiFragment();
                    break;
                case R.id.wode:
                    fragment = new WoDeFragment();
                    break;
            }
            return fragment;
        }
}